//
//  ShareController.h
//  SolarSeek
//
//  Created by Erick Fejta on 05/01/27.
//  Copyright 2005 Erick Fejta. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class ServerConnection;
@class PeerConnectionsController;
@class SharePeer;
@class ShareLocal;
@class SolarSeekEngine;

@interface ShareController : NSObject {
	NSMutableSet *_shares;
	NSMutableSet *_sharesPeer;
	NSFileManager *_fm;
	
	ServerConnection *_serverConnection;
	PeerConnectionsController *_peerConnectionsController;
	SolarSeekEngine *_engine;
	
	NSArray	*_sharesPeerReceived;
	NSMutableArray *_sharesPeerReceivedTemp;
	
	NSString *_contentsFolderReceived;
}

- (id)initWithEngine:(SolarSeekEngine *)engine;
- (void)addFileOrDirectory:(NSString *)path;
- (void)removeFileOrDirectory:(NSString *)path;

- (void)addDirectory:(NSString *)directory;
- (void)removeDirectory:(NSString *)directory;

- (void)addDirectoryExcludingSubdirectories:(NSString *)directory;
- (void)removeDirectoryExcludingSubdirectories:(NSString *)directory;

- (void)addFile:(NSString *)file;
- (void)removeFile:(NSString *)file;

- (NSArray *)filesAllShared;
- (id)searchForWords;
- (NSArray *)sharesPeerReceived;

- (ShareLocal *)shareForSharedPath:(NSString *)sharedPath;
@end